<!-- 
20071227 0941: Eric Kao was created.
-->

<%@ page contentType="text/html; charset=UTF-8" %>
<html>
<head>
<script type='text/javascript' src='../dwr/interface/basicUtilJS.js'></script>
<script type='text/javascript' src='../dwr/engine.js'></script>
<script type='text/javascript' src='../dwr/util.js'></script>

<script type="text/javascript" language="javascript">

//要處理 exception, 就先需設定這行, 傳入的參數為 function name
dwr.engine.setErrorHandler( exceptionHandler );

//顯示 exception 的訊息, 如同: exception.getMessage()
function exceptionHandler( msg )
{
	alert( msg );
}

function test()
{	
    basicUtilJS.testException( loadInfo );
}
function loadInfo( data )
{
    dwr.util.setValue( "replyId", data );
}

</script>

<title>
Hello World
</title>
</head>
<body bgcolor="#ffffff"> 
1. 這是一個顯示 exception 的測試<br>
2. 要告知系統 MyException 是 exception 的一種, 所以要在 dwr.xml 做設定
 
<p>
    <input type="button" value="執行" onclick="test()"/><br>  
    <span id="replyId"></span>  
</p>

</body>
</html>
